<template>
  <view class="page">
    <view class="box">
        <view class="item">开票金额<span>￥{{ obj.detail.invoice_amount }}</span></view>
        <view class="item">公司名称<span>{{ obj.detail.company_name }}</span></view>
        <view class="item">发票抬头<span>{{ obj.detail.look_up }}</span></view>
        <view class="item" v-if="obj.detail.email">常用邮箱<span>{{ obj.detail.email }}</span></view>
        <view class="item" v-if="obj.detail.phone">联系电话<span>{{ obj.detail.phone }}</span></view>
        <view class="item">申请时间<span>{{ obj.detail.created_at }}</span></view>
        <view class="item">当前状态<span style="color: #FFBB50;">{{ obj.invoice_status[obj.detail.status] }}</span></view>
        <view class="item-1">预计将在1天内发送至邮箱</view>
        <view class="btn" @click="handleNav(obj.detail.id)">查看相应的订单</view>
    </view>
  </view>
</template>
<script>
import { invoicingDetail } from "@/utils/request.js";
import { onLoad } from "uview-ui/libs/mixin/mixin";
export default {
  data() {
    return {
      obj: {},
    };
  },
  onLoad(option){
    const data={id:option.id}
    this.invoicingDetail(data).then(res=>{
      if(res){
        this.obj=res
      }
    })
  },
  methods:{
    async invoicingDetail(data){
      return await invoicingDetail(data)
    },
    handleNav(id){
        uni.navigateTo({ url: './invoiceOrder?id='+id })
    },
  }
};
</script>
<style lang="scss" scoped>
.box{
    padding: 20rpx 0 33rpx;
    background: #ffffff;
    .btn{
        margin-top: 42rpx;
    }
    .item{
        width: 694rpx;
        margin: 24rpx auto 0;
        font-size: 24rpx;
        color: #7F7F7F;
        span{
            color:#333333;
            margin-left: 20rpx;
        }
    }
    .item-1{
        font-size: 21rpx;
        color: #7F7F7F;
        margin-top: 9rpx;
        padding-left: 146rpx;
    }
}
</style>